-
Notifications
You must be signed in to change notification settings - Fork 0
Fix/instance discovery cache consistency #96
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
We'll reference the remote server in GitHub and configure clients to use `uvx`
- Replaced local server execution with uvx package-based configuration for improved reliability - Added GetUvxCommand helper to generate correct package version command string - Updated config generation to use `uvx mcp-for-unity` instead of local Python server - Modified Codex and client configuration validation to support uvx-based setup - Removed unused server source directory handling and related preferences - Updated tests to verify uvx command generation
We don't commit temp folders, tests are expected to clean up after themselves
…comparisons are not precise
- Replaced local server path detection with uvx-based package installation from git repository - Updated all configuration generators to use structured uvx command parts (command, --from URL, package) - Renamed UV path references to UVX for clarity and consistency - Added GetUvxCommandParts() helper to centralize uvx command generation - Added GetMcpServerGitUrl() to handle git repository URL construction - Updated client configuration validation
- Added GetUvxPackageSourcePath method to locate unity-mcp package in uv cache by traversing git checkouts - Replaced hardcoded "Dummy" path in PythonToolSyncProcessor with dynamic path resolution - Added validation for Server directory structure and pyproject.toml to ensure correct package location
Key thing is that MCPForUnity/UnityMcpServer/src is still deleted
…ystem - Removed PythonToolsAsset and file-based sync processor in favor of attribute-based tool discovery - Implemented CustomToolRegistrationProcessor with automatic registration on startup and script reload - Added registration enable/disable preference and force re-registration capability
- Implemented HTTP transport option with configurable URL/port alongside existing stdio mode - Added cache management service with menu item to clear uvx package cache - Updated config builder to generate transport-specific arguments and VSCode type field based on selected mode
- Replaced separate host/port arguments with single --http-url parameter for cleaner configuration - Updated server to parse URL and allow individual host/port overrides when needed - Consolidated HTTP client implementation with connection testing and tool execution support
…rt flag - Replaced --enable-http-server flag with --transport choice parameter (stdio/http) for clearer intent - Removed redundant HTTP port field from UI since HTTP mode uses the same URL/port as MCP client - Simplified server startup logic by consolidating transport mode determination
- Changed HTTP mode to use URL-based configuration instead of command-line arguments - Added proper cleanup of incompatible fields when switching between stdio and HTTP transports - Moved uvx command parsing inside stdio-specific block to avoid unnecessary processing in HTTP mode
…sistency The unity_instances resource was using force_refresh=False, which returned cached instances (5-second cache). This caused a mismatch with set_active_instance which uses force_refresh=True, leading to instances being shown in the resource that no longer existed when trying to set them as active. By changing to force_refresh=True, the resource now always shows current instances that match what set_active_instance sees, fixing the instance switching issue.
|
Skipped: This PR changes more files than the configured file change limit: ( |
|
Important Review skippedMore than 25% of the files skipped due to max files limit. The review is being skipped to prevent a low-quality review. 46 files out of 155 files are above the max files limit of 100. Please upgrade to Pro plan to get higher limits. You can disable this status message by setting the ✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Note
Replace legacy Python-based workflow with uvx + FastMCP, add HTTP transport and dynamic tool discovery/registration, and remove old Python tool registry/sync with corresponding UI and test updates.
Server/custom_tools_manager.py,Server/fastmcp_tool_registry.py) and HTTP/stdio transport configuration; updateserver.pyto register endpoints and support--transport httpwith host/port.UnityMcpServer~/srcfiles (Dockerfile, configs, resources, tools, telemetry, tests) and addServer/pyproject.tomldeps (FastAPI/uvicorn).IToolDiscoveryService,ToolDiscoveryService); wire intoMCPServiceLocator.uvxdetection and overrides inPathResolverService; addGetUvxPackageSourcePath.IPythonToolRegistryService,PythonToolRegistryService,IToolSyncService,ToolSyncService).uvx/mcp-for-unity; improve temp asset cleanup in material/prefab tests; prune obsolete tests; ignore additional files in test project.Written by Cursor Bugbot for commit a7e0bd2. This will update automatically on new commits. Configure here.